"""
@file: order.py
@author: yangsiting
@data: 2021/05/01
@desc:
"""
from .base import ma
from models.orders import Order_Info,Order_User_Info


class Order_Schema(ma.Schema):
    class Meta:
        model = Order_Info
        fields = ('user_profile_id','goods_id','goods_num','goods_price','total_prices')

class Order_User_Schema(ma.Schema):
    class Meta:
        model = Order_User_Info
        fields = ('user_name','user_phone','user_addr','user_profile_id')


order_schema = Order_Schema()
orders_schema = Order_Schema(many=True)
order_user_shcema = Order_User_Schema()
orders_user_schema = Order_User_Schema(many=True)